Ternary 三元運算子


Posted by Rich on 2021-04-22

console.log(10 > 5 ? 'bigger' : 'smaller')
output:bigger

condition ? true : false
條件 ? true就執行 : false就執行


#note







Related Posts

VSCode Emmet: Go to Matching Pair

VSCode Emmet: Go to Matching Pair

Git 與 Github 版本控制基本指令與操作入門教學

Git 與 Github 版本控制基本指令與操作入門教學

D51_W6 直播檢討、W7 開始

D51_W6 直播檢討、W7 開始


Comments